# Maintainer: Daniel M. Capella <polyzen@archlinux.org>

pkgname=yamllint
pkgver=1.31.0
pkgrel=2
pkgdesc='Linter for YAML files'
arch=('any')
url=https://github.com/adrienverge/yamllint
license=('GPL3')
depends=('python-pathspec' 'python-yaml')
makedepends=('python-build' 'python-installer' 'python-setuptools'
             'python-wheel')
source=("https://files.pythonhosted.org/packages/source/${pkgname::1}/$pkgname/$pkgname-$pkgver.tar.gz")
sha256sums=('2d83f1d12f733e162a87e06b176149d7bb9c5bae4a9e5fce1c771d7f703f7a65')
b2sums=('f34da9302d9d3938f062931bc2aef2230b473798af0d2ad99dc89b4d814c49ce19c61363ff391e5c91d09497df9f83f6cfa1a0f34c8f74ef61341aa25ca320fb')

build() {
  cd $pkgname-$pkgver
  python -m build --wheel --skip-dependency-check --no-isolation
}

check() {
  cd $pkgname-$pkgver
  python -m unittest discover tests
}

package() {
  cd $pkgname-$pkgver
  python -m installer --destdir="$pkgdir" dist/*.whl
}
